<?php

/***  DOCUMENTATION LAYER

Ceo Sample Unit Test

Last Update: Aug 2007
  
DESCRIPTION
  this file provides a template for other simple unit tests.
  
NOTES
  $test_root dynamically sets root in order to keep tests working after
  they are moved to the __REPOSITORY directory
    
______________________________________________________________________________*/

$_tx0 = microtime();
$test_root = ( strpos(dirname(__FILE__), 'repository') === false ) ? '' : '../';


// Test Name
$test_name = 'error class test';

// Include Files
require_once($test_root . '../php_ceo/err.class.php');

// Configure Test
$debug = 1;


// Test Procedure
$Error = new CeoErr($debug=1, 'Test');
$Error->set_handler(array(&$Error,'alpha_handler'));
$Error->filter_trivial = 0;
$Error->trigger('a test error');
$Error->trigger('warning test', E_USER_WARNING);


// Footer
$_txn = microtime();
$stx = number_format(((substr($_txn,0,9)) + (substr($_txn,-10)) - (substr($_tx0,0,9)) - (substr($_tx0,-10))),4); 
echo "<h6>test '$test_name' complete in $stx s</h6>";
?>
